package wang.Seacher.seven.bean;

import com.geccocrawler.gecco.annotation.Attr;
import com.geccocrawler.gecco.annotation.Href;
import com.geccocrawler.gecco.annotation.HtmlField;
import com.geccocrawler.gecco.annotation.Image;
import com.geccocrawler.gecco.spider.HtmlBean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class PictureVo implements HtmlBean {

	/**
	 * @名称: PictureVo.java
	 * @包名： wang.Seacher.seven.bean
	 * @author： WanG
	 * @日期：2017年4月30日 下午11:31:38
	 */
	private static final long serialVersionUID = 3076910727527187028L;
	
	private String topic;
	
	@HtmlField(cssPath = "a > img")
	private String biaoti;

	// 图片说明
	@Href(click=true)
	@HtmlField(cssPath = "a")
	private String herf;
	
	// 图片
	@Image({"data-lazy-img", "src"})
    @HtmlField(cssPath="a > img")
	private String imgUrl;

	@Attr("width")
	@HtmlField(cssPath = "width")
	private String width;

	public PictureVo(String biaoti, String herf, String imgUrl, String width) {
		super();
		this.biaoti = biaoti;
		this.herf = herf;
		this.imgUrl = imgUrl;
		this.width = width;
	}
	
	
	
	

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	

//	public static PictureVo getPictureVo(String PictureVo) {
//		JSONObject parseObject = JSON.parseObject(PictureVo);
//		String newherf = getNewHerf(parseObject);
//		String newwidth = getNewWidth(parseObject);
//		String newalt = getNewAlt(parseObject);
//		return new PictureVo(newherf, newwidth, newalt);
//	}
//
//	private static String getNewAlt(JSONObject pictureVo) {
//		return pictureVo.getString("alt");
//	}
//
//	private static String getNewWidth(JSONObject pictureVo) {
//		return pictureVo.getString("width");
//	}
//
//	private static String getNewHerf(JSONObject pictureVo) {
//		return pictureVo.getString("herf");
//	}

}
